package com.woniuxy.user.mapper;

import com.hc.entity.Follow;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface FollowMapper {
    //取消关注，删除follow表中对应的信息
    int cancelFollow(Follow follow);

    /**
     * 实现关注功能
     * @param userid  关注用户
     * @param uId     被关注的用户
     */
    @Insert("insert hc_follow ( user_id,follower_id) values(#{userid},#{uId})")
    void addFollow(int userid,int uId);
}
